home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / U-Z / VideoToolbox 4.95.sit / VideoToolbox / Utilities / GrabDrivers / GrabSlotDrivers.c < prev    next >
MacBinary  |  1995-04-18  |  5.3 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Apr 18 23:29:35 1995, modified Tue Apr 18 23:29:35 1995, creator 'MMCC', type ASCII, 4555 bytes "GrabSlotDrivers.c" , at 0x124b 552 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 47 72 61 62 53 6c | 6f 74 44 72 69 76 65 72 |..GrabSl|otDriver|
|00000010| 73 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.c.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 11 cb 00 | 00 02 28 ab ba 34 1f ab |........|..(..4..|
|00000060| ba 34 1f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.4......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4b 21 00 00 |........|....K!..|
|00000080| 2f 2a 20 47 72 61 62 53 | 6c 6f 74 44 72 69 76 65 |/* GrabS|lotDrive|
|00000090| 72 73 2e 63 0d 52 65 70 | 65 61 74 65 64 6c 79 20 |rs.c.Rep|eatedly |
|000000a0| 63 61 6c 6c 73 20 74 68 | 65 20 53 6c 6f 74 20 4d |calls th|e Slot M|
|000000b0| 61 6e 61 67 65 72 20 74 | 6f 20 67 65 74 20 65 76 |anager t|o get ev|
|000000c0| 65 72 79 20 73 6c 6f 74 | 20 64 72 69 76 65 72 20 |ery slot| driver |
|000000d0| 61 6e 64 20 70 75 74 73 | 20 65 61 63 68 20 69 6e |and puts| each in|
|000000e0| 20 69 74 73 0d 6f 77 6e | 20 66 69 6c 65 2e 20 54 | its.own| file. T|
|000000f0| 68 65 73 65 20 66 69 6c | 65 73 20 63 61 6e 20 74 |hese fil|es can t|
|00000100| 68 65 6e 20 62 65 20 70 | 65 72 75 73 65 64 20 77 |hen be p|erused w|
|00000110| 69 74 68 20 74 68 65 20 | 52 65 73 45 64 69 74 20 |ith the |ResEdit |
|00000120| 43 4f 44 45 20 76 69 65 | 77 65 72 2e 20 0d 0d 54 |CODE vie|wer. ..T|
|00000130| 68 65 20 52 65 73 45 64 | 69 74 20 43 4f 44 45 20 |he ResEd|it CODE |
|00000140| 76 69 65 77 65 72 20 69 | 73 20 61 20 70 75 62 6c |viewer i|s a publ|
|00000150| 69 63 20 64 6f 6d 61 69 | 6e 20 66 69 6c 65 2c 20 |ic domai|n file, |
|00000160| 66 6f 72 20 75 73 65 20 | 77 69 74 68 20 52 65 73 |for use |with Res|
|00000170| 45 64 69 74 2c 20 64 69 | 73 74 72 69 62 75 74 65 |Edit, di|stribute|
|00000180| 64 20 62 79 3a 0d 49 72 | 61 20 4c 2e 20 52 75 62 |d by:.Ir|a L. Rub|
|00000190| 65 6e 0d 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |en.Apple| Compute|
|000001a0| 72 2c 20 49 6e 63 2e 0d | 32 30 35 32 35 20 4d 61 |r, Inc..|20525 Ma|
|000001b0| 72 69 61 6e 69 20 41 76 | 65 2e 2c 20 4d 53 3a 20 |riani Av|e., MS: |
|000001c0| 33 37 2d 41 0d 43 75 70 | 65 72 74 69 6e 6f 2c 20 |37-A.Cup|ertino, |
|000001d0| 43 61 2e 20 39 35 30 31 | 34 0d 49 72 61 40 41 70 |Ca. 9501|4.Ira@Ap|
|000001e0| 70 6c 65 2e 43 6f 6d 0d | 66 74 70 3a 2f 2f 66 74 |ple.Com.|ftp://ft|
|000001f0| 70 2e 61 70 70 6c 65 2e | 63 6f 6d 2f 64 74 73 2f |p.apple.|com/dts/|
|00000200| 6d 61 63 2f 74 6f 6f 6c | 73 2f 72 65 73 65 64 69 |mac/tool|s/resedi|
|00000210| 74 2f 0d 0d 4e 6f 74 65 | 20 74 68 61 74 20 47 72 |t/..Note| that Gr|
|00000220| 61 62 53 6c 6f 74 44 72 | 69 76 65 72 73 20 67 65 |abSlotDr|ivers ge|
|00000230| 74 73 20 74 68 65 20 64 | 72 69 76 65 72 20 64 69 |ts the d|river di|
|00000240| 72 65 63 74 6c 79 20 66 | 72 6f 6d 20 74 68 65 20 |rectly f|rom the |
|00000250| 63 61 72 64 27 73 20 63 | 6f 6e 66 69 67 75 72 61 |card's c|onfigura|
|00000260| 74 69 6f 6e 0d 52 4f 4d | 2c 20 77 68 65 72 65 61 |tion.ROM|, wherea|
|00000270| 73 20 69 74 20 69 73 20 | 70 6f 73 73 69 62 6c 65 |s it is |possible|
|00000280| 20 74 68 61 74 20 79 6f | 75 72 20 72 75 6e 2d 74 | that yo|ur run-t|
|00000290| 69 6d 65 20 53 79 73 74 | 65 6d 20 69 73 20 61 63 |ime Syst|em is ac|
|000002a0| 74 75 61 6c 6c 79 20 73 | 75 70 65 72 63 65 64 69 |tually s|upercedi|
|000002b0| 6e 67 0d 74 68 61 74 20 | 62 79 20 61 20 6c 61 74 |ng.that |by a lat|
|000002c0| 65 72 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 74 68 |er versi|on of th|
|000002d0| 65 20 64 72 69 76 65 72 | 20 6c 6f 61 64 65 64 20 |e driver| loaded |
|000002e0| 66 72 6f 6d 20 74 68 65 | 20 53 79 73 74 65 6d 20 |from the| System |
|000002f0| 66 69 6c 65 20 6f 72 20 | 62 79 20 61 6e 20 49 4e |file or |by an IN|
|00000300| 49 54 2e 0d 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |IT..If y|ou want |
|00000310| 74 68 65 20 61 63 74 69 | 76 65 20 76 65 72 73 69 |the acti|ve versi|
|00000320| 6f 6e 20 6f 66 20 74 68 | 65 20 64 72 69 76 65 72 |on of th|e driver|
|00000330| 20 69 74 20 77 6f 75 6c | 64 20 62 65 20 62 65 73 | it woul|d be bes|
|00000340| 74 20 74 6f 20 67 65 74 | 20 69 74 20 66 72 6f 6d |t to get| it from|
|00000350| 20 74 68 65 0d 64 65 76 | 69 63 65 20 6d 61 6e 61 | the.dev|ice mana|
|00000360| 67 65 72 2c 20 77 68 69 | 63 68 20 69 73 20 77 68 |ger, whi|ch is wh|
|00000370| 61 74 20 47 72 61 62 56 | 69 64 65 6f 44 72 69 76 |at GrabV|ideoDriv|
|00000380| 65 72 73 2e 63 20 64 6f | 65 73 2c 20 74 68 6f 75 |ers.c do|es, thou|
|00000390| 67 68 20 69 74 20 73 6b | 69 70 73 20 6e 6f 6e 2d |gh it sk|ips non-|
|000003a0| 76 69 64 65 6f 0d 64 65 | 76 69 63 65 73 2e 0d 0d |video.de|vices...|
|000003b0| 48 49 53 54 4f 52 59 3a | 0d 32 2f 38 39 20 64 67 |HISTORY:|.2/89 dg|
|000003c0| 70 20 57 72 6f 74 65 20 | 69 74 20 61 73 20 22 76 |p Wrote |it as "v|
|000003d0| 69 64 65 6f 20 68 61 63 | 6b 65 72 20 49 49 22 20 |ideo hac|ker II" |
|000003e0| 75 73 69 6e 67 20 54 48 | 49 4e 4b 20 43 20 33 2e |using TH|INK C 3.|
|000003f0| 0d 31 2f 33 2f 39 33 20 | 64 67 70 20 75 70 64 61 |.1/3/93 |dgp upda|
|00000400| 74 65 64 20 69 74 20 74 | 6f 20 54 48 49 4e 4b 20 |ted it t|o THINK |
|00000410| 43 20 35 20 61 6e 64 20 | 72 65 6e 61 6d 65 64 20 |C 5 and |renamed |
|00000420| 69 74 20 47 72 61 62 53 | 6c 6f 74 44 72 69 76 65 |it GrabS|lotDrive|
|00000430| 72 73 2e 63 0d 35 2f 31 | 31 2f 39 33 09 64 67 70 |rs.c.5/1|1/93.dgp|
|00000440| 09 61 64 64 65 64 20 63 | 68 65 63 6b 20 66 6f 72 |.added c|heck for|
|00000450| 20 53 6c 6f 74 20 4d 61 | 6e 61 67 65 72 2c 20 69 | Slot Ma|nager, i|
|00000460| 6e 20 72 65 73 70 6f 6e | 73 65 20 74 6f 20 62 75 |n respon|se to bu|
|00000470| 67 20 72 65 70 6f 72 74 | 20 62 79 20 4a 6f 6e 61 |g report| by Jona|
|00000480| 74 68 61 6e 20 42 72 65 | 63 68 65 72 2e 0d 37 2f |than Bre|cher..7/|
|00000490| 32 39 2f 39 34 20 64 67 | 70 20 45 6c 69 6d 69 6e |29/94 dg|p Elimin|
|000004a0| 61 74 65 64 20 75 73 65 | 20 6f 66 20 22 23 73 22 |ated use| of "#s"|
|000004b0| 20 70 72 69 6e 74 66 20 | 66 6f 72 6d 61 74 2c 20 | printf |format, |
|000004c0| 73 69 6e 63 65 20 69 74 | 27 73 20 6e 6f 74 20 73 |since it|'s not s|
|000004d0| 75 70 70 6f 72 74 65 64 | 20 62 79 0d 09 09 09 4d |upported| by....M|
|000004e0| 65 74 72 6f 77 65 72 6b | 73 20 43 6f 64 65 57 61 |etrowerk|s CodeWa|
|000004f0| 72 72 69 6f 72 20 43 2e | 0d 39 2f 35 2f 39 34 20 |rrior C.|.9/5/94 |
|00000500| 64 67 70 20 72 65 6d 6f | 76 65 64 20 61 73 73 75 |dgp remo|ved assu|
|00000510| 6d 70 74 69 6f 6e 20 69 | 6e 20 70 72 69 6e 74 66 |mption i|n printf|
|00000520| 27 73 20 74 68 61 74 20 | 69 6e 74 3d 3d 73 68 6f |'s that |int==sho|
|00000530| 72 74 2e 0d 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 20 |rt..*/.#|include |
|00000540| 22 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 22 |"VideoTo|olbox.h"|
|00000550| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 45 72 72 6f 72 |.#includ|e <Error|
|00000560| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 52 |s.h>.#in|clude <R|
|00000570| 65 73 6f 75 72 63 65 73 | 2e 68 3e 0d 23 69 6e 63 |esources|.h>.#inc|
|00000580| 6c 75 64 65 20 3c 54 72 | 61 70 73 2e 68 3e 0d 23 |lude <Tr|aps.h>.#|
|00000590| 69 6e 63 6c 75 64 65 20 | 3c 52 4f 4d 44 65 66 73 |include |<ROMDefs|
|000005a0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 56 69 |.h>.#inc|lude <Vi|
|000005b0| 64 65 6f 2e 68 3e 0d 74 | 79 70 65 64 65 66 20 73 |deo.h>.t|ypedef s|
|000005c0| 74 72 75 63 74 20 7b 0d | 09 73 68 6f 72 74 20 66 |truct {.|.short f|
|000005d0| 6c 61 67 73 3b 0d 09 73 | 68 6f 72 74 20 62 6c 61 |lags;..s|hort bla|
|000005e0| 6e 6b 73 5b 33 5d 3b 0d | 09 73 68 6f 72 74 20 6f |nks[3];.|.short o|
|000005f0| 70 65 6e 3b 0d 09 73 68 | 6f 72 74 20 70 72 69 6d |pen;..sh|ort prim|
|00000600| 65 3b 0d 09 73 68 6f 72 | 74 20 63 6f 6e 74 72 6f |e;..shor|t contro|
|00000610| 6c 3b 0d 09 73 68 6f 72 | 74 20 73 74 61 74 75 73 |l;..shor|t status|
|00000620| 3b 0d 09 73 68 6f 72 74 | 20 63 6c 6f 73 65 3b 0d |;..short| close;.|
|00000630| 09 53 74 72 32 35 35 20 | 6e 61 6d 65 3b 0d 7d 20 |.Str255 |name;.} |
|00000640| 56 69 64 65 6f 44 72 69 | 76 65 72 3b 0d 76 6f 69 |VideoDri|ver;.voi|
|00000650| 64 20 41 64 64 52 65 73 | 6f 75 72 63 65 54 6f 46 |d AddRes|ourceToF|
|00000660| 69 6c 65 28 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |ile(unsi|gned cha|
|00000670| 72 20 2a 66 69 6c 65 6e | 61 6d 65 2c 75 6e 73 69 |r *filen|ame,unsi|
|00000680| 67 6e 65 64 20 63 68 61 | 72 20 2a 6e 61 6d 65 2c |gned cha|r *name,|
|00000690| 52 65 73 54 79 70 65 20 | 74 79 70 65 2c 69 6e 74 |ResType |type,int|
|000006a0| 20 69 64 0d 09 2c 48 61 | 6e 64 6c 65 20 68 61 6e | id..,Ha|ndle han|
|000006b0| 64 6c 65 29 3b 0d 76 6f | 69 64 20 47 72 61 62 53 |dle);.vo|id GrabS|
|000006c0| 6c 6f 74 44 72 69 76 65 | 72 73 28 76 6f 69 64 29 |lotDrive|rs(void)|
|000006d0| 3b 0d 0d 76 6f 69 64 20 | 6d 61 69 6e 28 76 6f 69 |;..void |main(voi|
|000006e0| 64 29 0d 7b 0d 09 52 65 | 71 75 69 72 65 28 30 29 |d).{..Re|quire(0)|
|000006f0| 3b 0d 09 69 66 28 21 54 | 72 61 70 41 76 61 69 6c |;..if(!T|rapAvail|
|00000700| 61 62 6c 65 28 5f 53 6c | 6f 74 4d 61 6e 61 67 65 |able(_Sl|otManage|
|00000710| 72 29 29 0d 09 09 50 72 | 69 6e 74 66 45 78 69 74 |r))...Pr|intfExit|
|00000720| 28 22 53 6f 72 72 79 2c | 20 6e 6f 20 53 6c 6f 74 |("Sorry,| no Slot|
|00000730| 20 4d 61 6e 61 67 65 72 | 2e 5c 6e 22 29 3b 0d 09 | Manager|.\n");..|
|00000740| 4d 61 78 69 6d 69 7a 65 | 43 6f 6e 73 6f 6c 65 48 |Maximize|ConsoleH|
|00000750| 65 69 67 68 74 28 29 3b | 0d 09 70 72 69 6e 74 66 |eight();|..printf|
|00000760| 28 42 72 65 61 6b 4c 69 | 6e 65 73 28 22 57 65 6c |(BreakLi|nes("Wel|
|00000770| 63 6f 6d 65 20 74 6f 20 | 47 72 61 62 53 6c 6f 74 |come to |GrabSlot|
|00000780| 44 72 69 76 65 72 73 2e | 5c 6e 22 0d 09 22 54 68 |Drivers.|\n".."Th|
|00000790| 69 73 20 70 72 6f 67 72 | 61 6d 73 20 63 6f 70 69 |is progr|ams copi|
|000007a0| 65 73 20 61 6c 6c 20 64 | 72 69 76 65 72 73 20 66 |es all d|rivers f|
|000007b0| 72 6f 6d 20 79 6f 75 72 | 20 73 6c 6f 74 20 64 65 |rom your| slot de|
|000007c0| 76 69 63 65 73 2e 20 22 | 0d 09 22 4e 6f 74 65 20 |vices. "|.."Note |
|000007d0| 74 68 61 74 20 74 68 69 | 73 20 67 65 74 73 20 74 |that thi|s gets t|
|000007e0| 68 65 20 64 72 69 76 65 | 72 20 66 72 6f 6d 20 74 |he drive|r from t|
|000007f0| 68 65 20 63 61 72 64 27 | 73 20 63 6f 6e 66 69 67 |he card'|s config|
|00000800| 75 72 61 74 69 6f 6e 20 | 52 4f 4d 2c 20 77 68 65 |uration |ROM, whe|
|00000810| 72 65 61 73 20 22 0d 09 | 22 69 74 20 69 73 20 70 |reas "..|"it is p|
|00000820| 6f 73 73 69 62 6c 65 20 | 74 68 61 74 20 61 74 20 |ossible |that at |
|00000830| 72 75 6e 2d 74 69 6d 65 | 20 79 6f 75 72 20 53 79 |run-time| your Sy|
|00000840| 73 74 65 6d 20 72 65 70 | 6c 61 63 65 73 20 22 0d |stem rep|laces ".|
|00000850| 09 22 74 68 61 74 20 62 | 79 20 61 20 6c 61 74 65 |."that b|y a late|
|00000860| 72 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |r versio|n of the|
|00000870| 20 64 72 69 76 65 72 20 | 6c 6f 61 64 65 64 20 66 | driver |loaded f|
|00000880| 72 6f 6d 20 74 68 65 20 | 53 79 73 74 65 6d 20 66 |rom the |System f|
|00000890| 69 6c 65 20 6f 72 20 49 | 4e 49 54 2e 5c 6e 5c 6e |ile or I|NIT.\n\n|
|000008a0| 22 2c 37 38 29 29 3b 0d | 09 47 72 61 62 53 6c 6f |",78));.|.GrabSlo|
|000008b0| 74 44 72 69 76 65 72 73 | 28 29 3b 0d 7d 0d 0d 76 |tDrivers|();.}..v|
|000008c0| 6f 69 64 20 47 72 61 62 | 53 6c 6f 74 44 72 69 76 |oid Grab|SlotDriv|
|000008d0| 65 72 73 28 76 6f 69 64 | 29 0d 7b 0d 09 53 70 42 |ers(void|).{..SpB|
|000008e0| 6c 6f 63 6b 20 73 70 42 | 6c 6f 63 6b 3b 0d 09 53 |lock spB|lock;..S|
|000008f0| 45 42 6c 6f 63 6b 20 73 | 45 42 6c 6f 63 6b 3b 0d |EBlock s|EBlock;.|
|00000900| 09 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 6e |.unsigne|d char n|
|00000910| 61 6d 65 5b 32 35 36 5d | 2c 66 69 6c 65 6e 61 6d |ame[256]|,filenam|
|00000920| 65 5b 33 32 5d 3b 0d 09 | 69 6e 74 20 65 72 72 6f |e[32];..|int erro|
|00000930| 72 2c 76 65 72 73 69 6f | 6e 3b 0d 09 50 74 72 20 |r,versio|n;..Ptr |
|00000940| 2a 68 61 6e 64 6c 65 3b | 0d 09 56 69 64 65 6f 44 |*handle;|..VideoD|
|00000950| 72 69 76 65 72 20 2a 76 | 69 64 65 6f 44 72 69 76 |river *v|ideoDriv|
|00000960| 65 72 50 74 72 3b 0d 09 | 75 6e 73 69 67 6e 65 64 |erPtr;..|unsigned|
|00000970| 20 63 68 61 72 20 2a 62 | 79 74 65 50 74 72 3b 0d | char *b|ytePtr;.|
|00000980| 09 42 6f 6f 6c 65 61 6e | 20 6e 65 77 53 6c 6f 74 |.Boolean| newSlot|
|00000990| 4d 67 72 3b 09 2f 2f 20 | 53 47 65 74 54 79 70 65 |Mgr;.// |SGetType|
|000009a0| 53 52 73 72 63 20 72 65 | 71 75 69 72 65 73 20 73 |SRsrc re|quires s|
|000009b0| 79 73 74 65 6d 20 37 20 | 73 6c 6f 74 20 6d 61 6e |ystem 7 |slot man|
|000009c0| 61 67 65 72 0d 0d 09 6e | 65 77 53 6c 6f 74 4d 67 |ager...n|ewSlotMg|
|000009d0| 72 3d 28 53 56 65 72 73 | 69 6f 6e 28 26 73 70 42 |r=(SVers|ion(&spB|
|000009e0| 6c 6f 63 6b 29 3d 3d 6e | 6f 45 72 72 29 3b 0d 09 |lock)==n|oErr);..|
|000009f0| 73 70 42 6c 6f 63 6b 2e | 73 70 73 45 78 65 63 50 |spBlock.|spsExecP|
|00000a00| 42 6c 6b 20 3d 20 28 50 | 74 72 29 20 26 73 45 42 |Blk = (P|tr) &sEB|
|00000a10| 6c 6f 63 6b 3b 0d 09 73 | 70 42 6c 6f 63 6b 2e 73 |lock;..s|pBlock.s|
|00000a20| 70 53 6c 6f 74 20 3d 20 | 30 3b 0d 09 73 70 42 6c |pSlot = |0;..spBl|
|00000a30| 6f 63 6b 2e 73 70 49 44 | 20 3d 20 30 3b 0d 09 73 |ock.spID| = 0;..s|
|00000a40| 70 42 6c 6f 63 6b 2e 73 | 70 45 78 74 44 65 76 20 |pBlock.s|pExtDev |
|00000a50| 3d 20 30 3b 0d 2f 2a 0d | 09 73 70 42 6c 6f 63 6b |= 0;./*.|.spBlock|
|00000a60| 2e 73 70 43 61 74 65 67 | 6f 72 79 3d 63 61 74 44 |.spCateg|ory=catD|
|00000a70| 69 73 70 6c 61 79 3b 0d | 09 73 70 42 6c 6f 63 6b |isplay;.|.spBlock|
|00000a80| 2e 73 70 43 54 79 70 65 | 3d 30 3b 0d 09 73 70 42 |.spCType|=0;..spB|
|00000a90| 6c 6f 63 6b 2e 73 70 44 | 72 76 72 53 57 3d 30 3b |lock.spD|rvrSW=0;|
|00000aa0| 0d 09 73 70 42 6c 6f 63 | 6b 2e 73 70 44 72 76 72 |..spBloc|k.spDrvr|
|00000ab0| 48 57 3d 30 3b 0d 09 73 | 70 42 6c 6f 63 6b 2e 73 |HW=0;..s|pBlock.s|
|00000ac0| 70 54 42 4d 61 73 6b 3d | 33 3b 09 2f 2f 20 69 67 |pTBMask=|3;.// ig|
|00000ad0| 6e 6f 72 65 20 44 72 76 | 72 48 57 20 61 6e 64 20 |nore Drv|rHW and |
|00000ae0| 44 72 76 72 53 57 0d 2a | 2f 0d 09 77 68 69 6c 65 |DrvrSW.*|/..while|
|00000af0| 28 31 29 7b 0d 09 09 73 | 70 42 6c 6f 63 6b 2e 73 |(1){...s|pBlock.s|
|00000b00| 70 50 61 72 61 6d 44 61 | 74 61 3d 35 3b 09 2f 2f |pParamDa|ta=5;.//|
|00000b10| 20 6e 65 78 74 20 72 65 | 73 6f 75 72 63 65 2c 20 | next re|source, |
|00000b20| 77 68 65 74 68 65 72 20 | 65 6e 61 62 6c 65 64 20 |whether |enabled |
|00000b30| 26 20 64 69 73 61 62 6c | 65 64 0d 09 09 69 66 28 |& disabl|ed...if(|
|00000b40| 6e 65 77 53 6c 6f 74 4d | 67 72 29 65 72 72 6f 72 |newSlotM|gr)error|
|00000b50| 3d 53 47 65 74 53 52 73 | 72 63 28 26 73 70 42 6c |=SGetSRs|rc(&spBl|
|00000b60| 6f 63 6b 29 3b 0d 09 09 | 65 6c 73 65 20 65 72 72 |ock);...|else err|
|00000b70| 6f 72 3d 53 4e 65 78 74 | 53 52 73 72 63 28 26 73 |or=SNext|SRsrc(&s|
|00000b80| 70 42 6c 6f 63 6b 29 3b | 0d 09 09 69 66 28 65 72 |pBlock);|...if(er|
|00000b90| 72 6f 72 3d 3d 73 6d 4e | 6f 4d 6f 72 65 73 52 73 |ror==smN|oMoresRs|
|00000ba0| 72 63 73 29 20 62 72 65 | 61 6b 3b 0d 09 09 69 66 |rcs) bre|ak;...if|
|00000bb0| 28 65 72 72 6f 72 29 7b | 0d 09 09 09 70 72 69 6e |(error){|....prin|
|00000bc0| 74 66 28 22 53 4e 65 78 | 74 53 52 73 72 63 2f 53 |tf("SNex|tSRsrc/S|
|00000bd0| 47 65 74 53 52 73 72 63 | 20 65 72 72 6f 72 20 25 |GetSRsrc| error %|
|00000be0| 64 5c 6e 22 2c 65 72 72 | 6f 72 29 3b 0d 09 09 09 |d\n",err|or);....|
|00000bf0| 62 72 65 61 6b 3b 0d 09 | 09 7d 0d 09 09 73 70 42 |break;..|.}...spB|
|00000c00| 6c 6f 63 6b 2e 73 70 52 | 65 73 75 6c 74 20 3d 20 |lock.spR|esult = |
|00000c10| 28 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 29 20 |(unsigne|d long) |
|00000c20| 26 6e 61 6d 65 3b 0d 09 | 09 65 72 72 6f 72 20 3d |&name;..|.error =|
|00000c30| 20 53 52 65 61 64 44 72 | 76 72 4e 61 6d 65 28 26 | SReadDr|vrName(&|
|00000c40| 73 70 42 6c 6f 63 6b 29 | 3b 0d 09 09 70 32 63 73 |spBlock)|;...p2cs|
|00000c50| 74 72 28 6e 61 6d 65 29 | 3b 0d 09 09 70 72 69 6e |tr(name)|;...prin|
|00000c60| 74 66 28 22 53 52 65 61 | 64 44 72 76 72 4e 61 6d |tf("SRea|dDrvrNam|
|00000c70| 65 3d 25 73 5c 6e 22 2c | 6e 61 6d 65 29 3b 0d 09 |e=%s\n",|name);..|
|00000c80| 09 63 32 70 73 74 72 28 | 28 63 68 61 72 20 2a 29 |.c2pstr(|(char *)|
|00000c90| 6e 61 6d 65 29 3b 0d 09 | 09 70 72 69 6e 74 66 28 |name);..|.printf(|
|00000ca0| 22 73 70 53 6c 6f 74 3d | 25 64 2c 73 70 49 44 3d |"spSlot=|%d,spID=|
|00000cb0| 25 75 2c 73 70 45 78 74 | 44 65 76 3d 25 64 22 0d |%u,spExt|Dev=%d".|
|00000cc0| 09 09 09 2c 28 69 6e 74 | 29 73 70 42 6c 6f 63 6b |...,(int|)spBlock|
|00000cd0| 2e 73 70 53 6c 6f 74 2c | 28 75 6e 73 69 67 6e 65 |.spSlot,|(unsigne|
|00000ce0| 64 20 69 6e 74 29 73 70 | 42 6c 6f 63 6b 2e 73 70 |d int)sp|Block.sp|
|00000cf0| 49 44 2c 28 69 6e 74 29 | 73 70 42 6c 6f 63 6b 2e |ID,(int)|spBlock.|
|00000d00| 73 70 45 78 74 44 65 76 | 29 3b 0d 09 09 70 72 69 |spExtDev|);...pri|
|00000d10| 6e 74 66 28 22 2c 73 70 | 43 61 74 65 67 6f 72 79 |ntf(",sp|Category|
|00000d20| 3d 25 64 2c 73 70 43 54 | 79 70 65 3d 25 64 2c 73 |=%d,spCT|ype=%d,s|
|00000d30| 70 44 72 76 72 53 57 3d | 25 64 2c 73 70 44 72 76 |pDrvrSW=|%d,spDrv|
|00000d40| 72 48 57 3d 25 64 2c 73 | 70 52 65 66 4e 75 6d 3d |rHW=%d,s|pRefNum=|
|00000d50| 25 64 5c 6e 22 0d 09 09 | 09 2c 28 69 6e 74 29 73 |%d\n"...|.,(int)s|
|00000d60| 70 42 6c 6f 63 6b 2e 73 | 70 43 61 74 65 67 6f 72 |pBlock.s|pCategor|
|00000d70| 79 2c 28 69 6e 74 29 73 | 70 42 6c 6f 63 6b 2e 73 |y,(int)s|pBlock.s|
|00000d80| 70 43 54 79 70 65 2c 28 | 69 6e 74 29 73 70 42 6c |pCType,(|int)spBl|
|00000d90| 6f 63 6b 2e 73 70 44 72 | 76 72 53 57 0d 09 09 09 |ock.spDr|vrSW....|
|00000da0| 2c 28 69 6e 74 29 73 70 | 42 6c 6f 63 6b 2e 73 70 |,(int)sp|Block.sp|
|00000db0| 44 72 76 72 48 57 2c 28 | 69 6e 74 29 73 70 42 6c |DrvrHW,(|int)spBl|
|00000dc0| 6f 63 6b 2e 73 70 52 65 | 66 4e 75 6d 29 3b 0d 09 |ock.spRe|fNum);..|
|00000dd0| 09 6d 65 6d 63 70 79 28 | 66 69 6c 65 6e 61 6d 65 |.memcpy(|filename|
|00000de0| 2c 6e 61 6d 65 2c 33 32 | 29 3b 0d 09 09 2f 2a 20 |,name,32|);.../* |
|00000df0| 66 69 6c 65 6e 61 6d 65 | 20 6d 75 73 74 20 62 65 |filename| must be|
|00000e00| 20 74 72 75 6e 63 61 74 | 65 64 20 74 6f 20 33 31 | truncat|ed to 31|
|00000e10| 20 63 68 61 72 61 63 74 | 65 72 73 20 2a 2f 0d 09 | charact|ers */..|
|00000e20| 09 69 66 28 66 69 6c 65 | 6e 61 6d 65 5b 30 5d 20 |.if(file|name[0] |
|00000e30| 3e 20 33 31 29 20 66 69 | 6c 65 6e 61 6d 65 5b 30 |> 31) fi|lename[0|
|00000e40| 5d 3d 33 31 3b 0d 09 09 | 2f 2f 20 52 65 70 6c 61 |]=31;...|// Repla|
|00000e50| 63 65 20 6c 65 61 64 69 | 6e 67 20 22 2e 22 20 62 |ce leadi|ng "." b|
|00000e60| 79 20 22 2d 22 20 73 69 | 6e 63 65 20 74 68 65 20 |y "-" si|nce the |
|00000e70| 4d 61 63 20 66 69 6c 69 | 6e 67 20 73 79 73 74 65 |Mac fili|ng syste|
|00000e80| 6d 20 0d 09 09 2f 2f 20 | 69 73 20 63 6f 6e 66 75 |m ...// |is confu|
|00000e90| 73 65 64 20 62 79 20 66 | 69 6c 65 6e 61 6d 65 73 |sed by f|ilenames|
|00000ea0| 20 62 65 67 69 6e 6e 69 | 6e 67 20 77 69 74 68 20 | beginni|ng with |
|00000eb0| 22 2e 22 2e 0d 09 09 69 | 66 28 66 69 6c 65 6e 61 |"."....i|f(filena|
|00000ec0| 6d 65 5b 31 5d 3d 3d 27 | 2e 27 29 66 69 6c 65 6e |me[1]=='|.')filen|
|00000ed0| 61 6d 65 5b 31 5d 3d 27 | 2d 27 3b 0d 09 09 0d 09 |ame[1]='|-';.....|
|00000ee0| 09 2f 2a 20 67 65 74 20 | 68 61 6e 64 6c 65 20 74 |./* get |handle t|
|00000ef0| 6f 20 64 65 73 69 72 65 | 64 20 64 72 69 76 65 72 |o desire|d driver|
|00000f00| 20 72 65 73 6f 75 72 63 | 65 20 2a 2f 0d 09 09 65 | resourc|e */...e|
|00000f10| 72 72 6f 72 20 3d 20 53 | 47 65 74 44 72 69 76 65 |rror = S|GetDrive|
|00000f20| 72 28 26 73 70 42 6c 6f | 63 6b 29 3b 0d 09 09 69 |r(&spBlo|ck);...i|
|00000f30| 66 28 21 65 72 72 6f 72 | 29 20 7b 0d 09 09 09 68 |f(!error|) {....h|
|00000f40| 61 6e 64 6c 65 20 3d 20 | 28 50 74 72 20 2a 29 20 |andle = |(Ptr *) |
|00000f50| 73 70 42 6c 6f 63 6b 2e | 73 70 52 65 73 75 6c 74 |spBlock.|spResult|
|00000f60| 3b 0d 09 0d 09 09 09 2f | 2f 20 49 73 20 74 68 69 |;....../|/ Is thi|
|00000f70| 73 20 61 20 76 69 64 65 | 6f 20 64 72 69 76 65 72 |s a vide|o driver|
|00000f80| 3f 0d 09 09 09 76 69 64 | 65 6f 44 72 69 76 65 72 |?....vid|eoDriver|
|00000f90| 50 74 72 3d 2a 28 56 69 | 64 65 6f 44 72 69 76 65 |Ptr=*(Vi|deoDrive|
|00000fa0| 72 20 2a 2a 29 68 61 6e | 64 6c 65 3b 0d 09 09 09 |r **)han|dle;....|
|00000fb0| 69 66 28 45 71 75 61 6c | 53 74 72 69 6e 67 28 6e |if(Equal|String(n|
|00000fc0| 61 6d 65 2c 76 69 64 65 | 6f 44 72 69 76 65 72 50 |ame,vide|oDriverP|
|00000fd0| 74 72 2d 3e 6e 61 6d 65 | 2c 31 2c 31 29 29 7b 0d |tr->name|,1,1)){.|
|00000fe0| 09 09 09 09 2f 2f 20 50 | 72 6f 62 61 62 6c 79 20 |....// P|robably |
|00000ff0| 69 73 20 61 20 76 69 64 | 65 6f 20 64 72 69 76 65 |is a vid|eo drive|
|00001000| 72 2e 20 54 68 65 20 76 | 65 72 73 69 6f 6e 20 6e |r. The v|ersion n|
|00001010| 75 6d 62 65 72 20 6f 66 | 20 61 20 76 69 64 65 6f |umber of| a video|
|00001020| 20 64 72 69 76 65 72 20 | 0d 09 09 09 09 2f 2f 20 | driver |.....// |
|00001030| 69 73 20 74 68 65 20 66 | 69 72 73 74 20 77 6f 72 |is the f|irst wor|
|00001040| 64 2d 61 6c 69 67 6e 65 | 64 20 77 6f 72 64 20 61 |d-aligne|d word a|
|00001050| 66 74 65 72 20 74 68 65 | 20 6e 61 6d 65 20 73 74 |fter the| name st|
|00001060| 72 69 6e 67 2e 0d 09 09 | 09 09 62 79 74 65 50 74 |ring....|..bytePt|
|00001070| 72 3d 20 76 69 64 65 6f | 44 72 69 76 65 72 50 74 |r= video|DriverPt|
|00001080| 72 2d 3e 6e 61 6d 65 3b | 0d 09 09 09 09 62 79 74 |r->name;|.....byt|
|00001090| 65 50 74 72 20 2b 3d 20 | 31 2b 62 79 74 65 50 74 |ePtr += |1+bytePt|
|000010a0| 72 5b 30 5d 3b 09 2f 2a | 20 67 6f 20 74 6f 20 65 |r[0];./*| go to e|
|000010b0| 6e 64 20 6f 66 20 50 61 | 73 63 61 6c 20 73 74 72 |nd of Pa|scal str|
|000010c0| 69 6e 67 20 2a 2f 0d 09 | 09 09 09 62 79 74 65 50 |ing */..|...byteP|
|000010d0| 74 72 20 3d 20 28 75 6e | 73 69 67 6e 65 64 20 63 |tr = (un|signed c|
|000010e0| 68 61 72 20 2a 29 28 28 | 6c 6f 6e 67 29 28 62 79 |har *)((|long)(by|
|000010f0| 74 65 50 74 72 2b 31 29 | 20 26 20 7e 31 29 3b 09 |tePtr+1)| & ~1);.|
|00001100| 2f 2f 20 72 6f 75 6e 64 | 20 75 70 20 74 6f 20 77 |// round| up to w|
|00001110| 6f 72 64 20 62 6f 75 6e | 64 61 72 79 0d 09 09 09 |ord boun|dary....|
|00001120| 09 76 65 72 73 69 6f 6e | 20 3d 20 2a 28 73 68 6f |.version| = *(sho|
|00001130| 72 74 20 2a 29 62 79 74 | 65 50 74 72 3b 0d 09 09 |rt *)byt|ePtr;...|
|00001140| 09 7d 20 65 6c 73 65 20 | 76 65 72 73 69 6f 6e 3d |.} else |version=|
|00001150| 72 61 6e 64 28 29 3b 0d | 09 09 0d 09 09 09 41 64 |rand();.|......Ad|
|00001160| 64 52 65 73 6f 75 72 63 | 65 54 6f 46 69 6c 65 28 |dResourc|eToFile(|
|00001170| 66 69 6c 65 6e 61 6d 65 | 2c 6e 61 6d 65 2c 27 44 |filename|,name,'D|
|00001180| 52 56 52 27 2c 76 65 72 | 73 69 6f 6e 2c 68 61 6e |RVR',ver|sion,han|
|00001190| 64 6c 65 29 3b 0d 09 09 | 09 70 72 69 6e 74 66 28 |dle);...|.printf(|
|000011a0| 22 44 72 69 76 65 72 20 | 63 6f 70 69 65 64 20 74 |"Driver |copied t|
|000011b0| 6f 20 66 69 6c 65 20 d2 | 25 73 d3 2c 20 77 69 74 |o file .|%s., wit|
|000011c0| 68 20 72 65 73 6f 75 72 | 63 65 20 69 64 20 25 64 |h resour|ce id %d|
|000011d0| 5c 6e 22 0d 09 09 09 09 | 2c 70 32 63 73 74 72 28 |\n".....|,p2cstr(|
|000011e0| 66 69 6c 65 6e 61 6d 65 | 29 2c 28 69 6e 74 29 76 |filename|),(int)v|
|000011f0| 65 72 73 69 6f 6e 29 3b | 0d 09 09 09 44 69 73 70 |ersion);|....Disp|
|00001200| 6f 73 48 61 6e 64 6c 65 | 28 68 61 6e 64 6c 65 29 |osHandle|(handle)|
|00001210| 3b 0d 09 09 7d 0d 09 09 | 65 6c 73 65 20 70 72 69 |;...}...|else pri|
|00001220| 6e 74 66 28 22 4e 6f 20 | 64 72 69 76 65 72 2e 5c |ntf("No |driver.\|
|00001230| 6e 22 29 3b 0d 09 09 70 | 72 69 6e 74 66 28 22 5c |n");...p|rintf("\|
|00001240| 6e 22 29 3b 0d 09 7d 0d | 7d 0d 0d 00 00 00 00 00 |n");..}.|}.......|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 01 00 00 00 01 ae | 00 00 00 ae 00 00 00 7a |........|.......z|
|00001290| 00 00 14 2d 07 42 52 45 | 4e 54 2e 43 02 00 00 00 |...-.BRE|NT.C....|
|000012a0| 54 45 58 54 4b 41 48 4c | 01 00 00 8c 00 00 00 00 |TEXTKAHL|........|
|000012b0| 11 47 72 61 62 53 6c 6f | 74 44 72 69 76 65 72 73 |.GrabSlo|tDrivers|
|000012c0| 2e 63 02 00 00 00 50 61 | 72 74 53 49 54 21 00 00 |.c....Pa|rtSIT!..|
|000012d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 ab bf ee 48 00 00 | 00 00 00 00 02 28 00 00 |.....H..|.....(..|
|00001300| 00 00 0e 00 00 00 14 2d | 08 42 52 4f 59 44 4e 2e |.......-|.BROYDN.|
|00001310| 43 00 02 00 00 00 54 45 | 58 54 4b 41 48 4c 01 00 |C.....TE|XTKAHL..|
|00001320| 00 8c 00 60 00 00 00 00 | 14 59 00 00 00 00 0f e8 |...`....|.Y......|
|00001330| 00 00 26 00 00 00 00 00 | 00 00 00 00 00 00 a7 3e |..&.....|.......>|
|00001340| e0 15 a7 3e e0 15 00 00 | 00 00 00 00 00 00 00 00 |...>....|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 70 54 00 01 |........|....pT..|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 0e 00 00 00 14 2d 08 42 |........|.....-.B|
|00001380| 00 00 00 0a 00 00 09 18 | 00 47 00 00 00 00 00 00 |........|.G......|
|00001390| 00 1c 00 01 00 1a 00 00 | 09 18 00 47 00 96 8b 58 |........|...G...X|
|000013a0| 00 00 0b 6e 65 77 53 6c | 6f 74 4d 67 72 20 00 00 |...newSl|otMgr ..|
|000013b0| 00 28 00 02 00 00 08 14 | 00 00 08 23 0f 47 72 61 |.(......|...#.Gra|
|000013c0| 62 53 6c 6f 74 44 72 69 | 76 65 72 73 00 00 06 2b |bSlotDri|vers...+|
|000013d0| 00 00 06 2f 05 6d 61 69 | 6e 00 00 00 00 48 00 09 |.../.mai|n....H..|
|000013e0| 4d 6f 6e 61 63 6f 00 00 | 00 00 00 00 00 00 00 00 |Monaco..|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 00 03 00 04 00 3e 00 04 | 01 cd 02 63 00 3e 00 04 |.....>..|...c.>..|
|00001410| 01 cd 02 63 ab b9 ed e6 | 00 00 09 6c 00 00 09 6c |...c....|...l...l|
|00001420| 00 00 06 52 00 00 00 00 | 00 04 00 01 00 01 00 00 |...R....|........|
|00001430| 01 00 00 00 01 ae 00 00 | 00 ae 00 00 00 7a 00 70 |........|.....z.p|
|00001440| 14 68 28 66 00 00 00 1c | 00 7a 00 03 4d 50 53 52 |.h(f....|.z..MPSR|
|00001450| 00 01 00 22 42 4b 50 54 | 00 00 00 3a 44 54 56 55 |..."BKPT|...:DTVU|
|00001460| 00 00 00 46 4d 57 42 42 | 00 00 00 52 03 ef ff ff |...FMWBB|...R....|
|00001470| 00 00 00 2e 00 00 00 00 | 03 ed ff ff 00 00 00 5a |........|.......Z|
|00001480| 00 00 00 00 33 96 ff ff | 00 00 00 00 00 00 00 00 |....3...|........|
|00001490| 2c e0 ff ff 00 00 00 0e | 00 00 00 00 03 f0 ff ff |,.......|........|
|000014a0| 00 00 00 a6 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+